package entity

import (
	"time"

	"gorm.io/gorm"
	"shqsoft.cn/pas3ui/base"
)

//ShIndiJjzsdr 中收（私行）
type ShIndiJjzsdr struct {
	JLID  int       `gorm:"AUTO_INCREMENT;primary_key;column:JLID"`
	CPNO  string    `gorm:"column:CPNO"`
	CPNM  string    `gorm:"column:CPNM"`
	DXF   float64   `gorm:"column:DXF"`
	DRRQ  time.Time `gorm:"column:DRRQ"`
	CZRID int       `gorm:"column:CZRID"`
	CZR   string    `gorm:"column:CZR"`
	CZRQ  time.Time `gorm:"column:CZRQ"`
}

//TableName
func (ShIndiJjzsdr) TableName() string {
	return "SH_INDI_JJZSDR"
}

// BeforeCreate
func (u *ShIndiJjzsdr) BeforeCreate(tx *gorm.DB) (err error) {
	u.CZRQ = time.Now()
	return
}

//ShIndiJjzsdrEF 返回结构体
func ShIndiJjzsdrEF() base.EntityFunc {
	return func() interface{} {
		entity := ShIndiJjzsdr{}
		return &entity
	}
}

//ShIndiJjzsdrESF 返回结构体数组
func ShIndiJjzsdrESF() base.EntitiesFunc {
	return func() interface{} {
		var entities []ShIndiJjzsdr
		return &entities
	}
}

func init() {
	base.DaoPoolObj.Put("ShIndiJjzsdr", base.NewDefaultDao(ShIndiJjzsdrEF(), ShIndiJjzsdrESF(), nil, "my"))
}
